'use strict';

module.exports = app => {
	const {INTEGER,STRING,DECIMAL}=app.Sequelize;

	const PackageUser=app.model.define('packageUser',{
		id:{type:INTEGER,primaryKey:true},
		merchant_id:{type:INTEGER},
		name:{type:STRING(128)},
		category:{type:INTEGER},
		type:{type:INTEGER},
		flow:{type:INTEGER},
		flow_value:{type:STRING(32)},
		flow_multiple:{type:INTEGER},
		effect_day:{type:INTEGER},
		price:{type:DECIMAL(12,2)},
		cost:{type:DECIMAL(12,2)},
		caption_package:{type:STRING(255)},
		caption_prestore:{type:STRING(255)},
		policy_id:{type:INTEGER},
		policy_recharge:{type:INTEGER},
		pay_type:{type:INTEGER},
		effect_method:{type:INTEGER},
		auto_balance:{type:INTEGER},
		remark:{type:STRING(500)},
		status:{type:INTEGER},
		create_id:{type:INTEGER},
		create_name:{type:STRING(64)},
		create_time:{type:INTEGER},
		update_time:{type:INTEGER}});
	return PackageUser;
};